package 西交915编程题._2019;

import java.util.Scanner;

public class Question1 {
    //包含所有点的最小矩阵的左下角和右上角下标
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int x = in.nextInt();
        int y = in.nextInt();
        int min_x = Integer.MAX_VALUE, min_y = Integer.MAX_VALUE;
        int max_x = Integer.MIN_VALUE, max_y = Integer.MIN_VALUE;
        while (x != 0 || y != 0) {
            min_x = Math.min(x, min_x);
            min_y = Math.min(y, min_y);
            max_x = Math.max(x, max_x);
            max_y = Math.max(y, max_y);
            x = in.nextInt();
            y = in.nextInt();
        }
        if (min_x == max_x && min_y == max_y)   //特殊情况：只有一个点
            System.out.println("只有一个点：(" + min_x + ", " + min_y + ")");
        else {
            System.out.println("左下角：(" + min_x + ", " + min_y + ")");
            System.out.println("右上角：(" + max_x + ", " + max_y + ")");
        }
    }
}
